<?php

declare(strict_types=1);

namespace App\Model;

use Hyperf\DbConnection\Model\Model;

class PlayletSpreadLimit extends Model
{
    const STATUS_SHOW = 1;
    const STATUS_HIDE = 0;

    protected ?string $table = 'playlet_spread_limit';
    protected array $fillable = ['playlet_id','pay_episodes_number'];

    public function playlet()
    {
        return $this->hasOne(Playlet::class, 'id', 'playlet_id')->withTrashed()->select('id','name');
    }
}
